home *** CD-ROM | disk | FTP | other *** search
- C/ReadRaster { currentfile pixString RstrRead pop } Bdef
- /pixString null def
- /MaxSampleInt 0 def
- /OldGrayTransfer null def
- /OldBlackTransfer null def
- /OldRedTransfer null def
- /OldGreenTransfer null def
- /OldBlueTransfer null def
- /OldCyanTransfer null def
- /OldMagentaTransfer null def
- /OldYellowTransfer null def
- systemdict /setundercolorremoval known {
- {pop 0} setundercolorremoval
- } if
- systemdict /setblackgeneration known {
- {pop 0} setblackgeneration
- } if
- /DoBitmap { save
- 9 1 roll
- /pixString exch string store
- /RstrRead exch
- {/readhexstring}
- {/readstring}
- ifelse
- load def
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- /ReadRaster load
- 6 -1 roll dup 1 gt {
- false exch
- GXColorImage
- } {
- pop
- image
- } ifelse
- restore } Bdef
- /DoImageMask { save
- 1 index type /arraytype eq {
- exch concat
- 1 SetOrMode
- EnsureDeviceResolution
- } if
- 7 1 roll
- /pixString exch string store
- /RstrRead exch
- {/readhexstring}
- {/readstring}
- ifelse
- load def
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- ImageMaskSense exch
- /ReadRaster load
- gsave ImageMaskColor CurrColorSet SetIndexedColor
- imagemask
- grestore
- restore } Bdef
- /MakeBitmapStrings {
- /@1 Xstore
- [
- @1 -65535 0 {
- dup 65535 gt {
- pop 65535 string
- } {
- string
- } ifelse
- } for
- ]
- exch
- /RstrRead exch
- {/readhexstring}
- {/readstring}
- ifelse
- load def
- dup
- {
- currentfile exch RstrRead pop pop
- } forall
- } Bdef
- /StringDataIn {
- 2 copy get exch 1 add exch
- } Bdef
- /DrawBitmapString {
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- /StringDataIn load
- BitmapStrings 0
- 8 2 roll
- 6 -1 roll dup 1 gt {
- false exch
- GXColorImage
- } {
- pop
- image
- } ifelse
- pop pop
- } Bdef
- /Draw1bitBitmapString {
- shapeType /i eq CurrOrMode 0 eq and {
- 1
- 3 1 roll
- DrawIndexedBitmapStrings
- } {
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- ImageMaskSense exch
- /StringDataIn load
- BitmapStrings 0
- 7 2 roll
- imagemask
- pop pop
- } ifelse
- } Bdef
- /CreateColorSet {
- currentdict /PortablizeColorSetParams known {PortablizeColorSetParams} if
- 5 dict dup 2 index 4 add 1 roll
- begin
- exch
- /ColorSpace Xdef
- 1 index length /Size Xdef
- dup /Num Xdef
- array
- astore
- /Components Xdef
- ColorSpace null eq {
- /SetColorOp
- Num 1 eq
- {/setgray load def}
- { Num 3 eq
- {/GXSetRGBColor load def}
- {/setcmykcolor load def}
- ifelse
- } ifelse
- } {
- /SetColorOp /setcolor load def
- } ifelse
- end
- } Bdef
- /SetIndexedColor {
- begin
- ColorSpace null ne {ColorSpace setcolorspace} if
- Components {1 index get exch} forall pop
- SetColorOp
- end
- } Bdef
- languagelevel 2 ge {
- /LookupProc {
- CurrColorSet /Components get {
- 1 index dup
- CurrColorSet /Size get ge {
- pop pop 0
- } {
- get
- } ifelse
- exch
- } forall
- pop
- } Bdef
- } if
- languagelevel 2 ge {
- /DoIndexedBitmap { save
- 8 1 roll
- dup 0 gt {
- /pixString exch string store
- /RstrRead exch
- {/readhexstring}
- {/readstring}
- ifelse
- load def
- } {
- pop pop
- /pixString null store
- } ifelse
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- [
- /Indexed
- CurrColorSet begin
- ColorSpace null eq {
- Num 1 eq
- {/DeviceGray}
- { Num 3 eq
- {/DeviceRGB}
- {/DeviceCMYK}
- ifelse
- } ifelse
- } {
- ColorSpace
- } ifelse
- Size
- end
- /LookupProc load
- ] setcolorspace
- 7 dict dup begin
- 5 1 roll
- /ImageMatrix Xdef
- /BitsPerComponent Xdef
- /Height Xdef
- /Width Xdef
- /ImageType 1 def
- /Decode [0 2 BitsPerComponent exp 1 sub] def
- pixString null ne {
- /DataSource /ReadRaster load def
- } {
- /DataSource /StringDataIn load def
- BitmapStrings 0
- 3 2 roll
- } ifelse
- end
- image
- pixString null eq {pop pop} if
- restore } Bdef
- } if
- languagelevel 1 eq {
- /MaxSampleInt 0 store
- /LookupComponent {
- CurrColorSet /Components get
- exch get
- exch MaxSampleInt mul round cvi
- dup
- CurrColorSet /Size get ge {
- pop pop 0
- } {
- get
- } ifelse
- } Bdef
- /DoIndexedBitmap { save
- 8 1 roll
- dup 0 gt {
- /pixString exch string store
- /RstrRead exch
- {/readhexstring}
- {/readstring}
- ifelse
- load def
- 2 index 2 exch exp 1 sub /MaxSampleInt exch store
- InstallColorSetTransfers
- } {
- pop pop
- /pixString null store
- } ifelse
- 1 0 0 1
- 6 -2 roll neg exch neg exch
- ScratchMatrix astore
- CurrColorSet /Num get dup 1 eq {
- pop
- pixString null ne {
- /ReadRaster load
- } {
- /StringDataIn load
- BitmapStrings 0 7 2 roll
- } ifelse
- image
- } {
- 3 eq {
- pixString null ne {
- {ReadRaster dup dup} {} {}
- } {
- {StringDataIn dup dup} {} {} BitmapStrings 0 9 2 roll
- } ifelse
- true 3 GXColorImage
- } {
- pixString null ne {
- {ReadRaster dup dup dup } {} {} {}
- } {
- {StringDataIn dup dup dup} {} {} {} BitmapStrings 0 10 2 roll
- } ifelse
- true 4 GXColorImage
- } ifelse
- } ifelse
- pixString null eq {pop pop} if
- restore } Bdef
- } if
- languagelevel 1 eq {
- /InstallColorSetTransfers {
- CurrColorSet /Num get dup 1 eq {
- /OldGrayTransfer currenttransfer store
- {0 LookupComponent OldGrayTransfer} settransfer
- pop
- } {
- 3 eq {
- currentcolortransfer
- /OldGrayTransfer exch store
- /OldBlueTransfer exch store
- /OldGreenTransfer exch store
- /OldRedTransfer exch store
- {0 LookupComponent OldRedTransfer}
- {1 LookupComponent OldGreenTransfer}
- {2 LookupComponent OldBlueTransfer}
- {OldGrayTransfer}
- setcolortransfer
- } {
- currentcolortransfer
- /OldBlackTransfer exch store
- /OldYellowTransfer exch store
- /OldMagentaTransfer exch store
- /OldCyanTransfer exch store
- {1 exch sub 0 LookupComponent 1 exch sub OldCyanTransfer}
- {1 exch sub 1 LookupComponent 1 exch sub OldMagentaTransfer}
- {1 exch sub 2 LookupComponent 1 exch sub OldYellowTransfer}
- {1 exch sub 3 LookupComponent 1 exch sub OldBlackTransfer}
- setcolortransfer
- } ifelse
- } ifelse
- } Bdef
- } if
- /DrawIndexedBitmapStrings {
- F 0 DoIndexedBitmap
- } Bdef
- /Do1bitBitmap {
- dup type /arraytype eq
- CurrOrMode 0 ne or {
- DoImageMask
- } {
- 1
- 5 1 roll
- DoIndexedBitmap
- } ifelse
- } Bdef
- languagelevel 2 ge {
- /DoLevel2ColorImage {
- 9 dict begin
- /ImageType 1 def
- {
- /DataSource currentfile /ASCIIHexDecode filter def
- } {
- /DataSource currentfile def
- } ifelse
- neg exch neg exch matrix translate /ImageMatrix Xdef
- /BitsPerComponent Xdef
- /Height Xdef
- /Width Xdef
- /Decode [0 65535 0 65535 0 65535] def
- currentdict
- end
- image
- } Bdef
- /DoLevel2ColorImageString {
- 9 dict begin
- /ImageType 1 def
- /DataSource /StringDataIn load def
- neg exch neg exch matrix translate /ImageMatrix Xdef
- /BitsPerComponent Xdef
- /Height Xdef
- /Width Xdef
- /Decode [0 65535 0 65535 0 65535] def
- BitmapStrings 0
- currentdict
- end
- image
- pop pop
- } Bdef
- } if
-